﻿@model PageList<SystemReg>
@{
    int total = Model.TotalCount;
    int rowsnum = Model.RecordStartIndex;
    var regTypeText = "";
    }
<div class="table-scrollable">
    <table class="table table-striped table-bordered table-hover table-manage">
        <thead>
            <tr>
                <th class="w20px" hidden="hidden">
                    <label><input class="checkbox-check" type="checkbox"><span></span></label>
                </th>
                <th class="text-center w30px" data-order="@nameof(ManualReg.RowNumber)">序号</th>
                <th class="text-center w100px" data-order="@nameof(SystemReg.CarNumber)">车牌号</th>
                <th class="text-center w100px" data-order="@nameof(SystemReg.Line)">线路</th>
                <th class="text-center w100px" data-order="@nameof(SystemReg.ExitTime)">出站时间</th>
                <th class="text-center w100px" data-order="@nameof(SystemReg.RunSecond)">运行时间(分钟)</th>
                <th class="text-center w80px" data-order="@nameof(SystemReg.PassengerNumber)">出站乘客</th>
                @*<th class="text-center w80px" data-order="@nameof(SyncCarExitStation.SeatCount)">核载人数(人)</th>
                                    <th class="text-center w80px" data-order="@nameof(SystemReg.PassengerNumber)">售票数(张)</th>
                                <th class="text-center w120px" data-order="@nameof(SystemReg.Station)">所属客运站</th>
                    <th class="text-center w100px" data-order="@nameof(SystemReg.DriverName)">司机姓名</th>
                    <th class="text-center w100px" data-order="@nameof(SystemReg.DriverPhone)">联系电话</th>
                    <th class="text-center w100px" data-order="@nameof(SystemReg.RunStatus)">运行状态</th>*@
                <th class="text-center w80px" data-order="@nameof(SystemReg.PointName)">稽查点</th>
                <th class="text-center w80px" data-order="@nameof(SystemReg.CreateName)">操作人姓名</th>
                <th class="text-center w100px" data-order="@nameof(SystemReg.CreateTime)">登记时间</th>
                <th class="text-center w80px" data-order="@nameof(SystemReg.RegType)">登记类型</th>
                <th class="text-center w80px" data-order="@nameof(SystemReg.CheckStatus)">稽查状态</th>
                @*<th class="text-center w120px" data-order="@nameof(SystemReg.OffenceName)">违规类型</th>*@
                @*<th class="text-center w100px" data-order="@nameof(SystemReg.ProcessStatus)">处理结果</th>*@
                <th class="text-center w100px">操作</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var record in Model)
            {
                string rowclass = "";
                if (record.CheckStatus)
                {
                    rowclass = "row-red";
                }
                if (record.RegType == 0) { regTypeText = "系统登记"; }
                if (record.RegType == 1) { regTypeText = "自动登记"; }
                if (record.RegType == 2) { regTypeText = "人工登记"; }
                <tr class="cursor-pointer" data-url="@Url.Action("Details",new {id = record.Id})">
                    <td hidden="hidden">
                        <label><input class="checkbox-check" type="checkbox" value="@record.Id"><span></span></label>
                    </td>
                    <td class="text-center">@rowsnum</td>
                    <td class=""><a class="uimodal @rowclass" data-url="@Url.Action("Details", new {id = record.Id})">@record.CarNumber</a></td>
                    <td class="">@record.Line</td>
                    <td class="text-center">@DateTimeHelper.FormatDateHasSecond(record.ExitTime)</td>
                    <td class="">@record.RunSecond </td>
                    <td class="">@record.ExitNumber </td>
                    @*<td class="">@record.SeatCount </td>
                      <td class="">@record.PassengerNumber </td>
                      <td class="">@record.Station</td>
                      <td class="">@record.DriverName</td>
                      <td class="">@record.DriverPhone</td>*@
                    @*<td class="">@Html.BoolLabel(record.RunStatus, record.RunStatusText, record.RunStatusText)</td>*@
                    <td class="">@record.PointName</td>
                    <td class="">@record.CreateName</td>
                    <td class="text-center">@DateTimeHelper.FormatDateHasSecond(record.CreateTime)</td>
                    <td class="">@regTypeText</td>@*@Html.BoolLabel(!record.RegType, record.RegTypeText, record.RegTypeText)*@
                    <td class="">@Html.BoolLabel(!record.CheckStatus, record.CheckStatusText, record.CheckStatusText)</td>
                    @*<td class="">@record.OffenceName</td>
                        <td class="">@Html.BoolLabel(record.ProcessStatus, record.ProcessStatusText, record.ProcessStatusText)</td>*@
                    <td class="text-center">
                        <a class="color-primary uimodal" data-toggle="tooltip"
                           data-url="@Url.Action("Details", new {id = record.Id})"
                           title="查看详细">
                            <i class="fa fa-book">查看详细</i>
                        </a>
                    </td>
                </tr>
                rowsnum++;
            }
        </tbody>
    </table>
</div>
@Html.RenderPages(Model)
<script>
    var total = '@total';
    $('#sys_totalcount').text(total);
</script>